/**
 * Description:
 * Class Name:OutputFactory
 * Date:2022/1/30 17:05
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第6章_面向对象_下._6_6_接口_经Java9改进;

public class OutputFactory {
    public Output getOutput(){
        return new Printer();
    }

    public static void main(String[] args) {
        var of = new OutputFactory();
        var c = new Computer(of.getOutput());

        c.keyIn("book1");
        c.keyIn("book2");
        c.print();
    }
}
